#include <Carbon/Carbon.r>

#define Reserved8   reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved
#define Reserved12  Reserved8, reserved, reserved, reserved, reserved
#define Reserved13  Reserved12, reserved
#define dp_none__   noParams, "", directParamOptional, singleItem, notEnumerated, Reserved13
#define reply_none__   noReply, "", replyOptional, singleItem, notEnumerated, Reserved13
#define synonym_verb__ reply_none__, dp_none__, { }
#define plural__    "", {"", kAESpecialClassProperties, cType, "", reserved, singleItem, notEnumerated, readOnly, Reserved8, noApostrophe, notFeminine, notMasculine, plural}, {}

resource 'aete' (0, "Phidget OSAX, using phidgets from AppleScript") {
	0x1,  // major version
	0x0,  // minor version
	english,
	roman,
	{
		"Phidget Interface Kit",
		"Suite for handling Phidget Interface Kit.",
		'PIKI',
		1,
		1,
		{
			/* Events */

			"IKConnect",
			"Connect to Phidget Interface Kit",
			'PIKI', 'Open',
			reply_none__,
			'nmbr',
			"The serial of the Phidget Interface Kit you want to connect to. If none, PIKConnect will open the first one available or fail.",
			directParamOptional,
			singleItem, notEnumerated, Reserved13,
			{
				"host", 'POho', 'TEXT',
				"The host on which the Phidget WebService is running",
				required,
				singleItem, notEnumerated, Reserved13,
				"password", 'Popa', 'TEXT',
				"The password to connect to the WebService (default value is NULL)",
				required,
				singleItem, notEnumerated, Reserved13,
				"port", 'Popo', 'long',
				"The port on which to connect to the WebService (default value is 5001)",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKDisconnect",
			"Close the currenlty opened connection to a Phidget Interface Kit",
			'PIKI', 'Clos',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			},

			"IKReadAnalogicInput",
			"",
			'PIKI', 'ReAn',
			reply_none__,
			'nmbr',
			"the analogic IO to read. If no parameter is given, then you get the value of every analogic IO availables",
			directParamOptional,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKRawReadAnalogicInput",
			"",
			'PIKI', 'RRAn',
			reply_none__,
			'nmbr',
			"the analogic IO to read. If no parameter is given, then you get the value of every analogic IO availables",
			directParamOptional,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKReadDigitalInput",
			"",
			'PIKI', 'ReDi',
			reply_none__,
			'nmbr',
			"the digital IO to read. If no parameter is given, then you get the value of every digital IO availables",
			directParamOptional,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKReadDigitalOutput",
			"",
			'PIKI', 'ReOs',
			reply_none__,
			'nmbr',
			"the digital IO to read. If no parameter is given, then you get the value of every digital IO availables",
			directParamOptional,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKEnableDigitalOutput",
			"enable a digital output",
			'PIKI', 'ReED',
			reply_none__,
			'nmbr',
			"the digital output to enable",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKSetRatiometric",
			"activate ratiometric",
			'PIKI', 'RaTi',
			reply_none__,
			'bool',
			"the digital output to enable",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKDisableDigitalOutput",
			"disable a digital ouput",
			'PIKI', 'ReDD',
			reply_none__,
			'nmbr',
			"the digital output to disable",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{
				"kit", 'PIKo', '****',
				"The Phidget Interface Kit Object ",
				required,
				singleItem, notEnumerated, Reserved13
			},

			"IKGetVersion",
			"",
			'PIKI', 'Vers',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			},

			"IKGetStatus",
			"",
			'PIKI', 'Stat',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			},

			"IKGetDigitalOutputsCount",
			"",
			'PIKI', 'OuCo',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			},

			"IKGetDigitalInputsCount",
			"",
			'PIKI', 'InCo',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			},

			"IKGetAnalogicInputsCount",
			"",
			'PIKI', 'SeCo',
			reply_none__,
			'****',
			"the IKObject",
			directParamRequired,
			singleItem, notEnumerated, Reserved13,
			{

			}
		},
		{
			/* Classes */

		},
		{
			/* Comparisons */
		},
		{
			/* Enumerations */
		}
	}
};
